import { BaseDTO } from '@todo/core';
import { ENUM_POLICY_ACTION, ROLE_TYPE } from '../config/enum.ts';

export interface responseUserProfileDTO extends BaseDTO {
  data: {
    _id: string;
    role: UserRoleDTO;
    username?: string;
    email: string;
    mobileNumber?: string;
    firstName: string;
    lastName: string;
    photo?: UserPhotoDTO;
    signUpDate: string;
    signUpFrom: string;
    createdAt: string;
    updatedAt: string;
  };
}

export interface UserRoleDTO {
  _id: string;
  name: string;
  description?: string;
  isActive: boolean;
  type: ROLE_TYPE;
  permissions: UserRolePermissionDTO[];
  createdAt: string;
  updatedAt: string;
}

export interface UserRolePermissionDTO {
  action: ENUM_POLICY_ACTION[];
  subject: string;
}

export interface UserPhotoDTO {
  bucket: string;
  path: string;
  pathWithFilename: string;
  filename: string;
  completedUrl: string;
  baseUrl: string;
  mime: string;
  duration?: number;
  size: number;
}
